package com.albert.java_log4j_demo;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

/**
 * @author 陈晖
 * @version 1.0
 * @date 2021/10/29 10:32
 */
public class MyStr {
    private static final Pattern CHINA_PATTERN = Pattern.compile("^((13[0-9])|(14[0,1,4-9])|(15[0-3,5-9])|(16[2,5,6,7])|(17[0-8])|(18[0-9])|(19[0-3,5-9]))\\d{8}$");
    public static final int ss = 1;
    /**
     * sex
     */
     private int sex;

     /**
      * 名字
      */
      private int name;


    public static void main(String[] args) {

        String name = "中国";
        String endg = "zg";
        System.out.println(name.length());
        System.out.println(endg.length());

        String reg = "/^((\\+?[0-9]{2,4}\\-[0-9]{3,4}\\-)|([0-9]{3,4}\\-))?([0-9]{7,8})(\\-[0-9]+)?$/";
        String phone = "13632767495";

        for (int i = 0; i < 100; i++) {

        }
        Matcher m = CHINA_PATTERN.matcher(phone);
        System.out.println(m.matches());
        try {
            MyStr.testThrow();
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
    public static void testThrow(){
        throw new RuntimeException();
    }

    public MyUser getUser(){
        MyUser myUser = new MyUser("zhangsan");
        return myUser;
    }

    public void valid(MyUser myUser) {
        if (myUser != null) {
            //.....

        }
    }
}
